home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- from checkbox.lib.cache import cache
- from checkbox.properties import String
- from checkbox.registries.command import CommandRegistry
-
- class LsbRegistry(CommandRegistry):
- '''Registry for LSB information.
-
- Each item contained in this registry consists of the information
- returned by the lsb_release command.
- '''
- command = String(default = 'lsb_release -a 2>/dev/null')
- default_map = {
- 'Distributor ID': 'distributor_id',
- 'Description': 'description',
- 'Release': 'release',
- 'Codename': 'codename' }
-
- def __init__(self, filename = None, map = None):
- super(LsbRegistry, self).__init__(filename)
- if not map:
- pass
- self._map = self.default_map
-
-
- def items(self):
- items = []
- for l in self.split('\n'):
- if l:
- continue
- _[1][l]
-
- return items
-
- items = cache(items)
-
- factory = LsbRegistry
-